from direct.showbase.Loader import Loader
from panda3d.core import CollisionTraverser,CollisionNode
from panda3d.core import CollisionHandlerQueue,CollisionRay
from panda3d.core import Filename,AmbientLight,DirectionalLight
from panda3d.core import PandaNode,NodePath,Camera,TextNode
from panda3d.core import Vec3,Vec4,BitMask32,Point3,VBase4
from direct.gui.OnscreenText import OnscreenText
from direct.actor.Actor import Actor
import random, sys, os, math

class Camera():
     def __init__(self,base):
         self.pos = base.camera.getPos()
         self.heading = base.camera.getH()
         self.pitch = base.camera.getP()
         base.camLens.setFov(70)
         base.camLens.setNearFar(0.01, 500)
         self.sensitivity = 65.0
         self.movespeed = 10
         base.disableMouse()
         
     def Update(self):
        if self.heading > 360:
            self.heading = 0
        elif self.heading < 0:
            self.heading = 360
        if self.pitch > 90:
            self.pitch = 90
        elif self.pitch < -90:
            self.pitch = -90
        self.pos = base.camera.getPos()